<?php
/*
+ ---------------------------------------------------------------------- +
| e107Shop - An e-commerce plugin for the e107 content management system |
|                                                                        |
| ByOrder Europe 2007-2008                                               |
| http://e107shop.com                                                    |
| patrick@byorder.nl                                                     |
|                                                                        |
| Released under the terms and conditions of the LGPL                    |
|                                                                        |
| $Revision: 1.0                                                         |
| $Date: 2008/08/20                                                      |
| $Author: Bieleke                                                       |
+ ---------------------------------------------------------------------- +
*/

/*
    Function : e107shop_get_numformat
    ---------------------------------------
    Parameters : $amout = the amount to pay
    =======================================
    Deside how to display the number_format
    =======================================
*/

function e107shop_get_numformat($amount) {
    global $e107shop_db_name, $shop_settings;
    $currency = $shop_settings["currency"];
    switch ($currency) {
        case "EUR":
            return number_format($amount, 2, ",", ".");
            break;
        default:
            return number_format($amount, 2, ".", ",");
    }
}

/*
    Function : e107shop_get_dateformat
    -------------------------------------
    Parameters : None
    =====================================
    Deside how to display the date format
    =====================================
*/

function e107shop_get_dateformat() {
    global $e107shop_db_name, $shop_settings;
    $currency = $shop_settings["currency"];
    switch ($currency) {
        case "EUR":
            return date("j F Y, G:i");
            break;
        default:
            return date("F j, Y, g:i a");
    }
}
